function isDef(S) { return (eval('typeof(' + S + ')') != 'undefined' && eval('typeof(' + S + ')') != 'unknown');};function gElm(id) { return (is.ie4) ? document.all[id] : document.getElementById(id);};if(!isDef('$')) var $ = gElm;function checkBrowser() { var T = this; var b = navigator.appName; var v = navigator.appVersion; var u = navigator.userAgent; if (u == null)return; if (b == 'Netscape')T.b = 'ns'; else if (b == 'Microsoft Internet Explorer')T.b = 'ie'; else T.b = b;if (u.indexOf('Safari')>=0) T.b = 'sa'; T.v = parseInt(v); T.sa = (T.b == 'sa'); T.ns = (T.b == 'ns' && T.v >= 4); T.ns4 = (T.b == 'ns' && T.v == 4); T.ns5 = (T.b == 'ns' && T.v == 5); T.ns6 = (T.b == 'ns' && T.v == 5); T.ie = (T.b == 'ie' && T.v >= 4); T.ie4 = (u.indexOf('MSIE 4') > 0); T.ie5 = (u.indexOf('MSIE 5.0') > 0); T.ie55 = (u.indexOf('MSIE 5.5') > 0); T.ie6 = (u.indexOf('MSIE 6.0') > 0); T.ie7 = (u.indexOf('MSIE 7') > 0); if (T.ie5)T.v = 5; if (T.ie55)T.v = 5.5; if (T.ie6)T.v = 6; if (T.ie7)T.v = 7; T.min = (T.ns || (T.ie && T.v >= 6)); T.dom = (T.v >= 5); T.win = (u.indexOf('Win') > 0); T.mac = (u.indexOf('Mac') > 0);};var is = new checkBrowser();function openPop(u, n, w, h, c, s, o) { var l = 18; var t = 18; if (c) { l = (screen.availWidth - w)/2;t = (screen.availHeight -h)/2; }var popup = window.open(u, n, 'width=' + w + ', height=' + h + ', left=' + l + ', top=' + t + ', scrollbars=' + ((s) ? 'yes' : 'no') + ((o) ? ', ' + o : ''));setTimeout(function(){try {popup.focus();return false;} catch(error) {alert('Voc� deve desabilitar o recurso de anti pop-up para acessar este link.');return false;}}, 300); return false;};var iimg_off;var iimg_over;function pImg(src) { var obj = src.substring(src.lastIndexOf('/') + 1, src.lastIndexOf('.')); eval('i' + obj + '= new Image()'); eval('i' + obj + '.src="' + src + '"');};function cImg(id, obj) { var tId = 'document.images[\'' + id + '\']'; if (isDef(tId) && isDef('i' + obj))eval(tId).src = eval('i' + obj).src;};function sDiv(id,s) {var e = typeof(id) == 'object' ? id : $(id); e.style.display = s ? s : 'block';};function hDiv(id,s) {var e = typeof(id) == 'object' ? id : $(id); e.style.display = s ? s : 'none';};function shDiv(id) {var e = typeof(id) == 'object' ? id : $(id); if (e.style.display == 'block' || !e.style.display) e.style.display = 'none'; else e.style.display = 'block';};function addEvent(w, e, f, useCapture) {if (w.addEventListener) {w.addEventListener(e,f,useCapture);return true;} else if (w.attachEvent) {var r=w.attachEvent('on'+e,f);return r;} else {w['on'+e] = f;};};function ie_getElementsByTagName(str) {if (str=="*") return document.all;else return document.all.tags(str);};if(is.ie) document.getElementsByTagName = ie_getElementsByTagName;function gTag(t,n) {if(!n) n = document;if(!t) t = '*';return n.getElementsByTagName(t);};function gClass(c, t, n) {var elms = gTag(t, n);var cls = [];var arrElm = [];for (var i = 0; i<elms.length; i++){if (elms[i].className.length > 0){if (elms[i].className.split(c).length > 1) {cls = elms[i].className.split(' ');for (var a = 0; a < cls.length; a++){if (cls[a] == c){arrElm[arrElm.length] = elms[i];};};cls = null;};};};return arrElm;};function graft(parent, t, doc) { doc = (doc || parent.ownerDocument || document); var e; if(t == 'undefined') { throw complaining('Can\'t graft an undefined value'); } else if(t.constructor == String) { e = doc.createTextNode( t ); } else if(t.length == 0) { e = doc.createElement('span'); e.setAttribute('class', 'fromEmptyLOL'); } else { for(var i = 0; i < t.length; i++) { if( i == 0 && t[i].constructor == String ) { var snared; snared = t[i].match( /^([a-z][a-z0-9]*)\.([^\s\.]+)$/i ); if( snared ) {  e = doc.createElement( snared[1] );  e.setAttribute('class', snared[2] );  continue; } snared = t[i].match( /^([a-z][a-z0-9]*)$/i ); if( snared ) {  e = doc.createElement( snared[1] );  continue; }  e = doc.createElement('span'); e.setAttribute('class', 'namelessFromLOL'); } if( t[i] == 'undefined' ) { throw complaining('Can\'t graft an undefined value in a list!'); } else if( t[i].constructor == String || t[i].constructor == Array ) { graft( e, t[i], doc ); } else if( t[i].constructor == Number ) { graft( e, t[i].toString(), doc ); } else if( t[i].constructor == Object ) { for(var k in t[i]) {  if(k == 'style' && is.ie) { e.style.cssText = t[i][k];  } else if(typeof(t[i][k])=='function'){  e[k] = t[i][k];  } else {if (k == 'class') e.className = t[i][k]; e.setAttribute( k, t[i][k] );  } } } else { throw complaining('Object ' + t[i] + ' is inscrutable as an graft arglet.'); } } } parent.appendChild( e ); return e; };function complaining (s) { return new Error(s);}function createElm(e, n){e = (e || document.body);return graft(e, n);};function delElm(id){var e = typeof(id) == 'object' ? id : $(id);try{e.parentNode.removeChild(e);}catch(e){throw new Error("delElm: element does not exists!");}};function getPos(obj) {var curleft = curtop = 0;if (obj.offsetParent) {curleft = obj.offsetLeft;curtop = obj.offsetTop;while (obj = obj.offsetParent) {curleft += obj.offsetLeft;curtop += obj.offsetTop;}}return [curleft,curtop];};function docH(){return is.ie ? document.body.scrollHeight : document.height;};function docW(){return is.ie ? document.body.scrollWidth : document.width;};function winW() { return is.ie ? document.body.clientWidth : window.innerWidth;};function winH() { return is.ie ? document.body.clientHeight : window.innerHeight;};if(is.ie5 || is.ns4) alert('A vers�o de navegador que voc� est� usando n�o � compat�vel com este site.\nAtualize-o para que todos os elementos funcionem corretamente.');;if (typeof deconcept == "undefined") {var deconcept = new Object();}if (typeof deconcept.util == "undefined") {deconcept.util = new Object();}if (typeof deconcept.SWFObjectUtil == "undefined") {deconcept.SWFObjectUtil = new Object();}deconcept.SWFObject = function (_1, id, w, h, disableCache, _5, c, _7, _8, _9, _a) {if (!document.getElementById) {return;}if (!_5) {_5 = "6";}if (!c) {c = "#FFFFFF";}this.DETECT_KEY = _a ? _a : "detectflash";this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);this.params = new Object();this.variables = new Object();this.attributes = new Array();if (_1) {if (disableCache) {_1 += '?$_dt=' + new Date().getTime();}this.setAttribute("swf", _1);}if (id) {this.setAttribute("id", id);}if (w) {this.setAttribute("width", w);}if (h) {this.setAttribute("height", h);}if (_5) {this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();if (!window.opera && document.all && this.installedVer.major > 7) {deconcept.SWFObject.doPrepUnload = true;}if (c) {this.addParam("bgcolor", c);}var q = _7 ? _7 : "best";this.addParam("quality", q);this.setAttribute("useExpressInstall", false);this.setAttribute("doExpressInstall", false);var _c = (_8) ? _8 : window.location;this.setAttribute("xiRedirectUrl", _c);this.setAttribute("redirectUrl", "");if (_9) {this.setAttribute("redirectUrl", _9);}};deconcept.SWFObject.prototype = {useExpressInstall : function (_d) {this.xiSWFPath =!_d ? "../swf/expressinstall.swf" : _d;this.setAttribute("useExpressInstall", true);}, setAttribute : function (_e, _f) {this.attributes[_e] = _f;}, getAttribute : function (_10) {return this.attributes[_10];}, addParam : function (_11, _12) {this.params[_11] = _12;}, getParams : function () {return this.params;}, addVariable : function (_13, _14) {this.variables[_13] = _14;}, getVariable : function (_15) {return this.variables[_15];}, getVariables : function () {return this.variables;}, getVariablePairs : function () {var _16 = new Array();var key;var _18 = this.getVariables();for (key in _18) {_16[_16.length] = key + "=" + _18[key];}return _16;}, getSWFHTML : function () {var _19 = "";if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {if (this.getAttribute("doExpressInstall")) {this.addVariable("MMplayerType", "PlugIn");this.setAttribute("swf", this.xiSWFPath);}_19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" menu=\"false\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\"";_19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" ";var _1a = this.getParams();for (var key in _1a) {_19 += [key] + "=\"" + _1a[key] + "\" ";}var _1c = this.getVariablePairs().join("&");if (_1c.length > 0) {_19 += "flashvars=\"" + _1c + "\"";}_19 += "/>";}else {if (this.getAttribute("doExpressInstall")) {this.addVariable("MMplayerType", "ActiveX");this.setAttribute("swf", this.xiSWFPath);}_19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">";_19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />";_19 += "<param name=\"menu\" value=\"false\" />";var _1d = this.getParams();for (var key in _1d) {_19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />";}var _1f = this.getVariablePairs().join("&");if (_1f.length > 0) {_19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />";}_19 += "</object>";}return _19;}, write : function (_20) {if (this.getAttribute("useExpressInstall")) {var _21 = new deconcept.PlayerVersion([6, 0, 65]);if (this.installedVer.versionIsValid(_21) &&!this.installedVer.versionIsValid(this.getAttribute("version"))) {if (this.getAttribute("width") < 215) {this.setAttribute("width", 215);}if (this.getAttribute("height") < 137) {this.setAttribute("height", 137);}this.setAttribute("doExpressInstall", true);this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl")));document.title = document.title.slice(0, 47) + " - Flash Player Installation";this.addVariable("MMdoctitle", document.title);}}if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) {var n = (typeof _20 == "string") ? document.getElementById(_20) : _20;(!n) ? document.write(this.getSWFHTML()) : n.innerHTML = this.getSWFHTML();if(!(navigator.plugins && navigator.mimeTypes.length)) window[this.getAttribute('id')] = document.getElementById(this.getAttribute('id'));return true;}else {if (this.getAttribute("redirectUrl") != "") {document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion = function () {var _23 = new deconcept.PlayerVersion([0, 0, 0]);if (navigator.plugins && navigator.mimeTypes.length) {var x = navigator.plugins["Shockwave Flash"];if (x && x.description) {_23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));}}else {if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) {var axo = 1;var _26 = 3;while (axo) {try {_26++;axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26);_23 = new deconcept.PlayerVersion([_26, 0, 0]);}catch (e) {axo = null;}}}else {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch (e) {try {var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23 = new deconcept.PlayerVersion([6, 0, 21]);axo.AllowScriptAccess = "always";}catch (e) {if (_23.major == 6) {return _23;}}try {axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch (e) {}}if (axo != null) {_23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion = function (_29) {this.major = _29[0] != null ? parseInt(_29[0]) : 0;this.minor = _29[1] != null ? parseInt(_29[1]) : 0;this.rev = _29[2] != null ? parseInt(_29[2]) : 0;};deconcept.PlayerVersion.prototype.versionIsValid = function (fv) {if (this.major < fv.major) {return false;}if (this.major > fv.major) {return true;}if (this.minor < fv.minor) {return false;}if (this.minor > fv.minor) {return true;}if (this.rev < fv.rev) {return false;}return true;};deconcept.util = {getRequestParameter : function (_2b) {var q = document.location.search || document.location.hash;if (_2b == null) {return q;}if (q) {var _2d = q.substring(1).split("&");for (var i = 0; i < _2d.length; i++) {if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) {return _2d[i].substring((_2d[i].indexOf("=") + 1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs = function () {var _2f = document.getElementsByTagName("OBJECT");for (var i = _2f.length - 1; i >= 0; i--) {_2f[i].style.display = "none";for (var x in _2f[i]) {if (typeof _2f[i][x] == "function") {_2f[i][x] = function () {};}}}};if (deconcept.SWFObject.doPrepUnload) {if (!deconcept.unloadSet) {deconcept.SWFObjectUtil.prepUnload = function () {__flash_unloadHandler = function () {};__flash_savedUnloadHandler = function () {};window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet = true;}}if (!document.getElementById && document.all) {document.getElementById = function (id) {return document.all[id];};}var getQueryParamValue = deconcept.util.getRequestParameter;var FlashObject = deconcept.SWFObject;var SWFObject = deconcept.SWFObject;;var Init = {_functionLoadLst: [],_functionOnLoadLst: [],add: function($fnc){if(typeof($fnc) != 'function')return false;this._functionLoadLst[this._functionLoadLst.length] = $fnc;return true;},addOnLoad: function($fnc){if(typeof($fnc) != 'function')return false;this._functionOnLoadLst[this._functionOnLoadLst.length] = $fnc;return true;},run: function(){var _this = this;EventUtil.add(window,'load',function(){for(var i=0; i<_this._functionOnLoadLst.length; i++)_this._functionOnLoadLst[i]();});for(var i=0; i<this._functionLoadLst.length; i++)this._functionLoadLst[i]();}};var FunctionUtil = {_fncName:'',getName:function($fnc){if(typeof($fnc) != 'function'){return false;}else{this._fncName = $fnc.toString().replace(/\n/g,'');var slicePos = [];slicePos[0] = this._fncName.indexOf('function')+('function'.length);slicePos[1] = this._fncName.indexOf('()');this._fncName = this._fncName.slice(slicePos[0],slicePos[1]).replace(/ /,'');return this._fncName == '' ? false : this._fncName;}}};var EventUtil = {_listCounter: 0,_evtCounter: 0,_eventList:{},add: function($elm, $evt, $fnc, $name, $capture){this.remove($elm, $evt, $fnc);if(!this._eventList[$elm])this._eventList[$elm] = {};if(!this._eventList[$elm][$evt])this._eventList[$elm][$evt] = {};if(!$name){if(FunctionUtil.getName($fnc)){$name = FunctionUtil.getName($fnc);}else{$name = 'anonymous_'+this._evtCounter;this._evtCounter++;}}this._eventList[$elm].node = $elm;this._eventList[$elm].className = $elm.className;this._eventList[$elm].id = $elm.id;this._eventList[$elm].nodeName = $elm.nodeName;var evt = this._eventList[$elm][$evt];evt[$name] = $fnc;if($elm.addEventListener){$elm.addEventListener($evt, evt[$name], $capture);return true;}else if($elm.attachEvent){$elm.attachEvent("on" + $evt, evt[$name]);return true;}return false;},remove: function($elm, $evt, $fnc){var fnc = typeof($fnc) == 'function' ? $fnc : this._eventList[$elm][$evt][$fnc];if($elm.removeEventListener){$elm.removeEventListener($evt, fnc, false);return true;}else if($elm.detachEvent){$elm.detachEvent("on" + $evt, fnc);return true;}return false;},clear: function($elm, $evt){if(this._eventList[$elm])for(var i in this._eventList[$elm][$evt]){this.remove($elm, $evt, this._eventList[$elm][$evt][i]);}},list: function($elm, $debugNode){if($elm){var msg = '';msg += '<b>--- Element ' + this._eventList[$elm].node + '(' + this._listCounter + ')' + ' Events ---</b> <br />';msg+= 'Node: ' + this._eventList[$elm].node + ' | id: ' + this._eventList[$elm].id + ' | class: ' + this._eventList[$elm].className + ' | nodeName: ' + this._eventList[$elm].nodeName + '<br />';msg += '--- <br />';for(var j in this._eventList[$elm]){if(j != 'className' && j != 'id' && j != 'nodeName' && j != 'node'){msg += " " + j + ": " + '<br />';for(var i in this._eventList[$elm][j])msg += " " + i + ": " + this._eventList[$elm][j][i] + '<br />';msg += '---<br />';}}if($debugNode)$debugNode.innerHTML += msg;this._eventList[$elm].node.style.backgroundColor = '#fefede';this._eventList[$elm].node.innerHTML += '<strong class="EventUtilMarkers" style="font-size:9px; color:#fff; background:red; padding:0 3px;">'+this._listCounter+'</strong>';this._listCounter++;}else{if($debugNode)$debugNode.innerHTML = '';for(var i=0; i<gClass('EventUtilMarkers').length; i++){delElm(gClass('EventUtilMarkers')[0]);}for(var i in this._eventList){EventUtil.list(i, $debugNode);}this._listCounter = 0;}}};var UrlUtil = {_loc: document.location.href,getObj: function(){return document.location;},complete: function(){return this._loc;},protocol: function($url){$url = $url || this._loc;return $url.slice(0,$url.indexOf('//')-1);},host: function($url){$url = $url || this._loc;var index1 = $url.indexOf('//')+2;$url = $url.slice(index1);return $url.slice(0,$url.indexOf('/'));},completeHost: function($url){$url = $url || this._loc;return this.protocol($url)+'://'+this.host($url)+'/';},folder: function($url){$url = $url || this._loc;$url = $url.split('/');var newUrl = '';for(var i=3; i<$url.length; i++){if(i!=$url.length-1){newUrl += $url[i]+'/';}}return '/'+newUrl;},fileName: function($url){$url = $url || this._loc;var index1 = $url.indexOf('//')+2;$url = $url.slice(index1);$url = $url.slice($url.lastIndexOf('/')+1);if(this.query($url)){$url = $url.slice(0,$url.indexOf('?'));}else if(this.anchor($url)){$url = $url.slice(0,$url.indexOf('#'));}return $url || '';},query: function($url){$url = $url || this._loc;$url = $url.split('?');return ($url.length > 1 ? $url[1].split('#')[0] : false);},queryValue: function($name,$url){$url = $url || this._loc;var query = this.query($url);var queries = query.split('&');for(var i=0; i<queries.length; i++){if(queries[i].split('=')[0].toLowerCase() == $name.toLowerCase()){return queries[i].split('=')[1];break;}}return false;},anchor: function($url){$url = $url || this._loc;return ($url.split('#').length > 1) ? $url.split('#')[1] : false;},noAnchor: function($url){$url = $url || this._loc;return $url.split('#')[0];},noQuery: function($url){$url = $url || this._loc;return this.completeHost($url) + this.folder($url).slice(1) + this.fileName($url) + (this.anchor($url) ? '#'+this.anchor($url) : '');},uri: function($url){$url = $url || this._loc;return this.completeHost($url) + this.folder($url).slice(1) + this.fileName($url);}};var ObjectUtil = {list:function($obj){if(typeof($obj) != 'object')return false;for(var i in $obj)fb.info(i+': '+$obj[i]);}};var NodeUtil = {};NodeUtil.move = function($node,$toNode){var nodeToMove = null;var finalNode = null;nodeToMove = $node.cloneNode(true);delElm($node);try{return $toNode.appendChild(nodeToMove);}catch(e){return false;}};NodeUtil.getNode = function($elm){if(Type.node($elm)){return $elm;}else if(Type.string($elm)){return $($elm);}return null;};var fb = {info:function(m){if(window['console']){console.info(m);}else{if(!$('debugWindow')){if(!$('debugList')){createElm(null,['textarea',{id:'debugList',style:'position:absolute;top:0;left:0;width:20%;height:500px;overflow:auto;background:#fff;border-top:3px solid #665F53;z-index:1000;'}]);$('debugList').onkeypress = function($e){$e = $e || window.event;if($e.keyCode == 27)delElm('debugList');}}$('debugList').value = m+'\n__\n\n'+$('debugList').value;}}}};var trace = fb.info;String.prototype.trim = function(){return this.replace(/\n/g,'').replace(/^\s+|\s+$/g,'');};String.prototype.justNumber = function(){ var returnValue = ''; for(var i = 0; i<this.length; i++) if(!isNaN(Number(this.slice(i,i+1)))) returnValue+=this.slice(i,i+1); return Number(returnValue);};function colorCatMenu(){if(!$('navMenu'))return false;var lst = gTag('ul',$('navMenu'))[0];var elm = lst.childNodes;var cnt = 0;for(var i=0; i<elm.length; i++){if(elm[i].nodeType == 1){if(cnt%2==0)elm[i].className += ' on';cnt++;}}};var SameHeight = {_maxHeight: 0,run: function($arr){for(var i=0;i<$arr.length;i++){if($arr[i].offsetHeight > this._maxHeight)this._maxHeight = $arr[i].offsetHeight;if($arr[i].offsetHeight > this._maxHeight && $arr[i].className.indexOf('iecb') < 0)$arr[i].style.height = (this._maxHeight - ($arr[i].offsetHeight - this._maxHeight)) + 'px';}for(var i=0;i<$arr.length;i++)if($arr[i].className.indexOf('iecb') < 0)$arr[i].style.height = this._maxHeight + 'px';this._maxHeight = 0;},batch: function($class,$tag){for(var i=0; i<gClass($class).length; i++)SameHeight.run(gTag($tag,gClass($class)[i]));}};function okLogin(){if($('feedLogin'))hDiv('feedLogin');return false;}var PositionUtil = {};PositionUtil.getOverPosition = function($pos, $min, $max){if($pos <= $max && $pos >= $min){return $pos;}else{if($pos <= $min) return $min;if($pos >= $max) return $max;}};PositionUtil.isInsideArea = function($pos, $min, $max){if($pos <= $max && $pos >= $min)return true;return false;};var MouseOverOutDelay = function($obj){var _this = this;try{var node = $obj.node;var overFunction = $obj.overFunction;var outFunction = $obj.outFunction;var delay = $obj.delay*1000;}catch(e){return false;};var _canOn = false;var _canOut = false;var overEventFunction = function($e){EventUtil.remove(node,'mouseover',overEventFunction);_canOn = true;setTimeout(function(){if(_canOn){_canOut = true;if(typeof(overFunction) == 'function')overFunction($e,node);}},delay);};var outEventFunction = function($e){EventUtil.add(node,'mouseover',overEventFunction);_canOn = false;if(_canOut){_canOut = false;setTimeout(function(){if(!_canOn){if(typeof(outFunction) == 'function')outFunction($e,node);}},delay);}};var init = function(){_this.removeEvents();_this.addEvents();};this.removeEvents = function(){if(typeof(overFunction) == 'function')EventUtil.remove(node,'mouseover',overEventFunction);if(typeof(outFunction) == 'function')EventUtil.remove(node,'mouseout',outEventFunction);};this.addEvents = function(){if(typeof(overFunction) == 'function')EventUtil.add(node,'mouseover',overEventFunction);if(typeof(outFunction) == 'function')EventUtil.add(node,'mouseout',outEventFunction);};this.getNode = function(){return node;};this.getOverFunction = function(){return overEventFunction;};this.getOutFunction = function(){return outEventFunction;};this.runOverFunction = function(){overEventFunction();};this.runOutFunction = function(){outEventFunction();};init();};var Type = {string:function($str, $defaultValue){$defaultValue = $defaultValue || null;return (typeof($str) == 'string') ? $str : $defaultValue;},object:function($obj, $defaultValue){$defaultValue = $defaultValue || null;return (typeof($obj) == 'object') ? $obj : $defaultValue;},node:function($node, $defaultValue){$defaultValue = $defaultValue || null;try{return ($node.nodeType == 1) ? $node : $defaultValue;}catch(e){return $defaultValue;}},number:function($num, $defaultValue){$defaultValue = $defaultValue || null;return (typeof($num) == 'number') ? $num : $defaultValue;},boolean:function($bool, $defaultValue){$defaultValue = $defaultValue || null;return (typeof($bool) == 'boolean') ? $bool : $defaultValue;}};var SubMenu = function($obj){var _this = this;var delay = $obj.delay || .25;var zindex = $obj.zIndex || 5;var position = {};try{var linkNode = $obj.linkNode;var subMenuNode = $obj.subMenuNode;var onClassName = $obj.onClassName;position.reference = $obj.position ? $obj.position.reference : linkNode;if($obj.position){position.left = $obj.position.left || 0;position.top = $obj.position.top || 0;}var mouseOverFunction = $obj.mouseOverFunction;var mouseOutFunction = $obj.mouseOutFunction;}catch(e){return false;};var mouseEventDelay = null;var insideLink = {x:false,y:false};var insideSubMenu = {x:false,y:false,value:false,canGoOut:true};var pos = {mouseX:0,mouseY:0,linkNode:{minX:0,maxX:0,minY:0,maxY:0},subMenuNode:{minX:0,maxX:0,minY:0,maxY:0}};var noClickBg = null;var _isHidden = false;var hideCombos = function(){if(_isHidden)return;var combos = gTag('select',$('contMain'));if(is.ie6){for(var i=0; i<combos.length; i++){combos[i].style.visibility = 'hidden';}}};var showCombos = function(){if(!_isHidden)return;var combos = gTag('select',$('contMain'));if(is.ie6){for(var i=0; i<combos.length; i++){combos[i].style.visibility = 'visible';}}};var moveNodeToBody = function(){subMenuNode = NodeUtil.move(subMenuNode,document.body);subMenuNode.className = onClassName;};var overLinkFunction = function(){hideCombos();var left = (position.reference ? (getPos(position.reference)[0]+position.left) : position.left);var top = (position.reference ? (getPos(position.reference)[1]+position.top) : position.top);if(!subMenuNode.style.visibility)subMenuNode.style.visibility = 'hidden';sDiv(subMenuNode);subMenuNode.style.position = 'absolute';subMenuNode.style.zIndex = zindex;subMenuNode.style.left = PositionUtil.getOverPosition(left,0,winW()-subMenuNode.offsetWidth-20)+'px';subMenuNode.style.top = PositionUtil.getOverPosition(top,0,winH()-subMenuNode.offsetHeight-20)+'px';subMenuNode.style.visibility = 'visible';if(typeof(mouseOverFunction) == 'function')mouseOverFunction();EventUtil.remove(document,'mousemove',subMenuFunction);EventUtil.add(document,'mousemove',subMenuFunction);};var subMenuFunction = function($e){pos.mouseX = $e.clientX+gTag('html')[0].scrollLeft;pos.mouseY = $e.clientY+gTag('html')[0].scrollTop;pos.linkNode.minX = getPos(linkNode)[0];pos.linkNode.minY = getPos(linkNode)[1];pos.linkNode.maxX = pos.linkNode.minX+position.reference.offsetWidth;pos.linkNode.maxY = pos.linkNode.minY+position.reference.offsetHeight;pos.subMenuNode.minX = getPos(subMenuNode)[0];pos.subMenuNode.minY = getPos(subMenuNode)[1];pos.subMenuNode.maxX = pos.subMenuNode.minX+subMenuNode.offsetWidth;pos.subMenuNode.maxY = pos.subMenuNode.minY+subMenuNode.offsetHeight;insideLink.x = PositionUtil.isInsideArea(pos.mouseX,pos.linkNode.minX,pos.linkNode.maxX);insideLink.y = PositionUtil.isInsideArea(pos.mouseY,pos.linkNode.minY,pos.linkNode.maxY);insideSubMenu.x = PositionUtil.isInsideArea(pos.mouseX,pos.subMenuNode.minX,pos.subMenuNode.maxX);insideSubMenu.y = PositionUtil.isInsideArea(pos.mouseY,pos.subMenuNode.minY,pos.subMenuNode.maxY);if((insideSubMenu.x && insideSubMenu.y) || (insideLink.x && insideLink.y)){insideSubMenu.value = true;hideCombos();_isHidden = true;if(!insideSubMenu.canGoOut){mouseEventDelay.runOverFunction();insideSubMenu.canGoOut = true;}}else{insideSubMenu.value = false;if(insideSubMenu.canGoOut){mouseEventDelay.runOutFunction();setTimeout(function(){if(!insideSubMenu.value){subMenuNode.style.visibility = 'hidden';showCombos();_isHidden = false;insideSubMenu.canGoOut = true;setTimeout(function(){deleteNoClickBg();EventUtil.remove(document,'mousemove',subMenuFunction);},150);if(typeof(mouseOutFunction) == 'function')mouseOutFunction();}},delay*1000);insideSubMenu.canGoOut = false;}}};var createNoClickBg = function(){if(!noClickBg){var div = document.createElement('div');div.style.position = 'absolute';div.style.backgroundColor = 'red';div.style.opacity = .5;div.style.visibility = 'hidden';div.style.top = div.style.left = 0;div.style.width = div.style.height = "100%";div.style.zIndex = zindex-1;noClickBg = document.body.appendChild(div);}else{sDiv(noClickBg);}};var deleteNoClickBg = function(){hDiv(noClickBg); };var init = function(){moveNodeToBody();mouseEventDelay = new MouseOverOutDelay({node:linkNode,delay:delay,overFunction:overLinkFunction,outFunction:function(){}});EventUtil.add(linkNode,'mouseover',createNoClickBg);};this.getSubMenu = function(){return subMenuNode;};init();};var ChannelsSubMenu = {_obj:{},_initClass:function($name,$elm){var div = gTag('div',$elm)[0] || null;var a = gTag('a',$elm)[0] || null;if(div && a){this._obj[$name] = new SubMenu({linkNode:a,subMenuNode:div,onClassName:div.className.replace(/_off/,'')+' lollyDefault',position:{reference:a,left:35,top:a.offsetHeight+1},zIndex:20});}},init:function(){var li = gTag('li',$('menuCat'));for(var i=0; i<li.length; i++){this._initClass('subMenu_'+i,li[i]);}}};var AmplifyLinkArea = function($obj){try{var node = $obj.node;var link = $obj.link;var href = link.href;}catch(e){return false;};var goUrl = function($loc){document.location.href = $loc;};var apply = function(){EventUtil.add(node,'click',function(){goUrl(href);});EventUtil.add(node,'mouseover',function(){node.className += ' on';});EventUtil.add(node,'mouseout',function(){node.className = node.className.replace(/on/,'');});node.style.cursor = 'pointer';};apply();};var applyLinksToProductLists = {obj: [],init: function(){var uls = gClass('lstProducts');var lis = null;for(var i=0; i<uls.length; i++){lis = gTag('li',uls[i]);for(var j=0; j<lis.length; j++){this.obj[this.obj.length] = new AmplifyLinkArea({node:lis[j],link:gTag('a',lis[j])[0]});}}}};var Box = {_node:null,create:function($content,$contClass,$contStyle,$id){var lollyId = $id || 'defaultLollyId';var cont = null;var contentCont = null;if($($id)){delElm($($id));}else if(this._node){delElm(this._node);this._node = null;}this._node = createElm(null,['div',{'class':'lollyDefault',id:lollyId},['div',{'class':'cont'},['a',{'class':'btFecharLolly',href:'javascript:;',onclick:function(){closeBox(lollyId);}},'fechar']],['div',{'class':'shadowLeft'},''],['div',{'class':'shadowBottom'},'']]);cont = gClass('cont','*',this._node)[0];contentCont = createElm(cont,['div',{'class':(typeof($contClass) == 'string' ? ' '+$contClass : ''),style:(typeof($contStyle) == 'string' ? ' '+$contStyle : '')},'']);if($content)contentCont.innerHTML = $content;return {box:this._node,cont:contentCont};},open:function($obj){$obj = typeof($obj) == 'object' ? $obj : {};var content = $obj.content || null;var callback = typeof($obj.callback) == 'function' ? $obj.callback : null;var onOpen = typeof($obj.onOpen) == 'function' ? $obj.onOpen : null;var onClose = typeof($obj.onClose) == 'function' ? $obj.onClose : null;var contClass = typeof($obj.contClass) == 'string' ? $obj.contClass : null;var contStyle = typeof($obj.contStyle) == 'string' ? $obj.contStyle : null;var vAlign = $obj.vAlign ? $obj.vAlign : 'middle';var id = typeof($obj.id) == 'string' ? $obj.id : null;var elm = null;if(!id){elm = this.create(content,contClass,contStyle,id);id = elm.box.id;}else if($(id)){elm = {box:$(id),cont:gClass('cont','*',$(id))[0]};}openBox(id,{fix:true,vAlign: vAlign,onOpen:onOpen,onClose:onClose,config:{zIndex:20,bgColor:'ffffff'}});if(callback)callback(elm);return elm;},fetchHtml:function($url,$obj){$obj = typeof($obj) == 'object' ? $obj : {};var callback = typeof($obj.callback) == 'function' ? $obj.callback : null;var onOpen = typeof($obj.onOpen) == 'function' ? $obj.onOpen : null;var onClose = typeof($obj.onClose) == 'function' ? $obj.onClose : null;var contClass = typeof($obj.contClass) == 'string' ? $obj.contClass : null;var contStyle = typeof($obj.contStyle) == 'string' ? $obj.contStyle : null;var vAlign = $obj.vAlign ? $obj.vAlign : 'middle';var id = typeof($obj.id) == 'string' ? $obj.id : null;var _this = this;include($url,{onFinish:function($r){var box = _this.open({content:$r,contClass:contClass,contStyle:contStyle,id:id,callback:callback,onOpen:onOpen,onClose:onClose,vAlign: vAlign});}});}};function getInfoTable(stMarca,stGenero){$('contTableSize').innerHTML='';$('imgMarca').src= url_global+'/Imagens/px.gif';$('imgMarca').alt='';var marca;var genero;if(stMarca && stMarca!='0'){marca=stMarca;}else{marca='';}if(stGenero && stGenero!='0'){genero=stGenero;}else{genero='';}$('selGenero').options.length = 0;$('selGenero').options[$('selGenero').options.length] = new Option('G�nero','0');switch (marca){case "nike":$('stNike').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Kids','kids');$('selGenero').options[$('selGenero').options.length] = new Option('Escolar','escolar');$('selGenero').options[$('selGenero').options.length] = new Option('Pr�-escolar','preescolar');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Nike';break;case "asics":$('stAsics').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Infantil','infantil');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Asics';break;case "adidas":$('stAdidas').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Adidas';break;case "and1":$('stAnd1').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='AND1';break;case "mizuno":$('stMizuno').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Mizuno';break;case "newbalance":$('stNewbalance').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Infantil','infantil');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='New Balance';break;case "puma":$('stPuma').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Puma';break;case "reebok":$('stReebok').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Infantil','infantil');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Reebok';break;case "crocs":$('stCrocs').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Infantil','infantil');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='Crocs';break;case "diadora":$('stDiadora').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='diadora';break;case "fila":$('stFila').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='fila';break;case "olympikus":$('stOlympikus').selected=true;$('selGenero').options[$('selGenero').options.length] = new Option('Masculino','masculino');$('selGenero').options[$('selGenero').options.length] = new Option('Feminino','feminino');$('selGenero').options[$('selGenero').options.length] = new Option('Infantil','infantil');pImg(url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif');$('imgMarca').src=url_global+'/Imagens/tabela_tamanho/ico_'+marca+'.gif';$('imgMarca').alt='olympikus';break;default:$('imgMarca').src=url_global+'/Imagens/px.gif';$('imgMarca').alt='';}if(genero!='' && marca!=''){include('../tabelas/'+stMarca+'_'+stGenero+'.asp',{onFinish:function($cont){$('contTableSize').innerHTML = $cont;zebra();}});for(var i=0;i<$('selGenero').options.length;i++){if($('selGenero').options[i].value==genero)$('selGenero').selectedIndex=i;}}}function openTableSize(stMarca,stGenero){Box.fetchHtml('../tabelas/tabela_html.asp',{vAlign:80,onOpen:function(){$('selMarca').selectedIndex=0;$('selGenero').selectedIndex=0;getInfoTable(stMarca,stGenero);},onClose:function(){$('selMarca').selectedIndex=0;$('selGenero').selectedIndex=0;$('contTableSize').innerHTML='';}});}function zebra(){var arrTr = $('contTableSize').getElementsByTagName('tr');for(var i = 1; i<arrTr.length; i++) arrTr[i].style.backgroundColor = (i%2) ? '#f3f0ec' : '#ece7e1';}var DetailWindowCrossTrend = function($num){var _this = this;_this.node = $('wdwCategoryLst'+$num).parentNode.cloneNode(true);delElm($('wdwCategoryLst'+$num).parentNode);_this.window = null;var content = '<h2 class="titProduct">'+gTag('h2',gClass('boxProductDetail')[Number($num)-1])[0].innerHTML.trim()+'</h2>';var infoContainer = gClass('lstContainerBorder','*',_this.node)[0].childNodes;var contNodes = 0;for(var i=0; i<infoContainer.length; i++)if(infoContainer[i].nodeType == 1){if(contNodes != 0)hDiv(infoContainer[i]);contNodes++;}$('descButton'+$num).href = 'javascript:;';$('descButton'+$num).onclick = function(){Box.open({content: content + _this.node.innerHTML,contClass:_this.node.className.split(' ')[0],callback:function($elm){_this.window = new DetailWindow(gTag('li',$('wdwCategoryLst'+$num)),gClass('lstContainer','*',$('wdwCategoryTxt'+$num)));}});};};var dhtml = {flashObj_:null,flashContainer_:null,container_:null,properties_:{top:320,left:'center',right:null,width:400,height:400,disableCache: false},open:function($address, $properties, $variables, $disableCache, $container){this.container_ = Type.node(NodeUtil.getNode($container), NodeUtil.getNode('container'));$properties = Type.object($properties, {});$variables = Type.object($variables);this.properties_.top = Type.number($properties.top, this.properties_.top);this.properties_.left = $properties.left || this.properties_.left;this.properties_.right = $properties.right || this.properties_.right;this.properties_.width = Type.number($properties.width, this.properties_.width);this.properties_.width = (this.properties_.width > this.container_.offsetWidth) ? this.container_.offsetWidth : this.properties_.width;this.properties_.height = Type.number($properties.height, this.properties_.height);this.properties_.disableCache = Type.boolean($properties.disableCache, false);var elmStyle = null;if(!this.flashContainer_){elmStyle = ['position:absolute','z-index:15','display:none',].join(';');this.flashContainer_ = createElm(this.container_,['div',{id:'bannerDhtml', style: elmStyle},'']);}else{sDiv(this.flashContainer_);}this.flashContainer_.style.width = this.properties_.width+'px';this.flashContainer_.style.height = this.properties_.height+'px';if(typeof(this.properties_.left) == 'string'){this.flashContainer_.style.left = '50%';this.flashContainer_.style.marginLeft = -(this.properties_.width/2)+'px';}else{this.flashContainer_.style.left = 0;this.flashContainer_.style.marginLeft = this.properties_.left+'px';}this.flashContainer_.style.top = 0;this.flashContainer_.style.marginTop = this.properties_.top+'px';flashObj_ = new FlashObject($address,'bannerDhtmlFlash',this.properties_.width, this.properties_.height, this.properties_.disableCache, 8);flashObj_.addParam('wmode','transparent');if($variables)for(var i in $variables)flashObj_.addVariable(i,$variables[i]);flashObj_.write(this.flashContainer_.id);this.show();},close:function(){var _this = this;this.hide();setTimeout(function(){if(_this.flashContainer_){delElm(_this.flashContainer_.id);_this.flashContainer_ = null;}},250);},show:function(){if(this.flashContainer_)sDiv(this.flashContainer_);},hide:function(){if(this.flashContainer_)hDiv(this.flashContainer_);}};var validateRadio = function($array){try{for(var i=0; i<$array.length; i++){if($array[i].checked == true)return true;}return false;}catch(e){return false;}};var scrollToElm = function($elm){$elm = (typeof($elm) == 'string') ? ($($elm) || null) : ($elm || null);if(getPos($elm)[1] < (gTag('html')[0].scrollTop || gTag('body')[0].scrollTop))scrollTo(0,getPos($elm)[1]);};function showTip(stTexto,elemAl,lft){var lft = (lft == 'undefined')? 10 : lft;sDiv('boxInfo');$('boxInfo').style.top=getPos(elemAl.id)[1]+'px';$('boxInfo').style.left=getPos(elemAl.id)[0]+elemAl.offsetWidth+lft+'px';$('pInfo').innerHTML=stTexto;}function abreJudaCartao(){var boxCode = ['<div class="w570">','<h2 class="titSecao titCodSeg mb0">','C�digo de seguran�a do cart�o','</h2>','<br class="cb" />','<p class="cartaoPadrao">','Nos cart�es <strong>Visa, MasterCard e Dinners</strong> este n�mero se encontra na parte de tr�s, como <strong>indicado na imagem</strong>. Use os tr�s �ltimos d�gitos.','</p>','<p class="cartaoAmex">','Nos cart�es <strong>American Express</strong> este n�mero est� localizado na frente, logo acima do n�mero do cart�o de cr�dito, como <strong>indicado na imagem</strong>. S�o quatro d�gitos.','</p>','</div>'];boxCode = boxCode.join('');Box.open({content:boxCode,onOpen:function(){},onClose:function(){}});}function expandeDiv($div){$($div).style.position = "absolute";$($div).style.width = "760px";$($div).style.height= "500px";$($div).style.zIndex= "50";$($div).style.textAlign = "left";}function recolheDiv($div){$($div).style.position = "static";$($div).style.width = "auto";$($div).style.height= "auto";$($div).style.zIndex= "0";$($div).style.textAlign = "center";};var valColorError = "#FEFEDE";var __buttonSubmit__;var __newWidth__;var __buttonSubmitSrc__;var __cAlert__;var __lang__;var __cAlertDiv__;var __cAlertTxt__;var __oldFocus__;var __cAlertShow__ = true;function frmValidator(frmname, lang) { this.formobj = document.forms[frmname]; if (!this.formobj) { alert('BUG: N�o foi poss�vem acessar o formul�rio: ' + frmname); return; }; if (this.formobj.onsubmit) { this.formobj.old_onsubmit = this.formobj.onsubmit; this.formobj.onsubmit = null; } else { this.formobj.old_onsubmit = null; }; this.formobj.onsubmit = form_submit_handler; this.lang = __lang__ = lang; this.cAlert = customAlert; this.av = add_validation; this.cSubmit = change_submit; this.amv = addMultiVal; this.customValidation = set_addnl_vfunction; this.clearAllValidations = clear_all_validations; this.formobj.onreset = rABgColor;};function set_addnl_vfunction(functionname) { this.formobj.addnlvalidation = functionname;};function clear_all_validations() { for (var itr = 0; itr < this.formobj.elements.length; itr++) { this.formobj.elements[itr].validationset = null; };};function customAlert(d, t, s) {if(!s){ if (!gElm(d) || !gElm(t)) { alert('BUG: Box id not defined or Text id not defined.'); return false; }} else { __cAlert__ = true; __cAlertDiv__ = d; __cAlertTxt__ = t; __cAlertShow__ = s; }};function form_submit_handler() { for (var itr = 0; itr < this.elements.length; itr++) { if (this.elements[itr].validationset && !this.elements[itr].validationset.validate()) { return false; }; }; if (this.addnlvalidation) { str = ' var ret = ' + this.addnlvalidation + '()'; eval(str); if (!ret)return ret; }; if (__buttonSubmit__) { if (__lang__ == 'en') { stButton = 'Sending...'; } else if (__lang__ == 'es') { stButton = 'Enviando...'; } else { stButton = 'Enviando...'; } __buttonSubmit__.title = stButton; if (__buttonSubmitSrc__) { __buttonSubmit__.src = __buttonSubmitSrc__; } else { __buttonSubmit__.value = stButton; } __buttonSubmit__.disabled = 'disabled'; __buttonSubmit__.style.cursor = 'wait'; if (__newWidth__) { __buttonSubmit__.style.width = __newWidth__; }; } return true;};function add_validation(itemname, descriptor, errstr) { if (!this.formobj) { alert('BUG: Formul�rio n�o definido corretamente!'); return; }; var itemobj = this.formobj[itemname]; if (!itemobj)alert('BUG: N�o foi poss�vel encontrar nehum campo com o name=' + itemname); if (itemobj.length && isNaN(itemobj.selectedIndex)) { itemobj = itemobj[0]; }; if (!itemobj) { alert('BUG: N�o foi poss�vel encontrar o campo com o nome: ' + itemname); return; }; if (!itemobj.validationset) { itemobj.validationset = new ValidationSet(itemobj); }; itemobj.validationset.add(descriptor, errstr);};function change_submit(bt, newWidth, buttonSubmitSrc) { if (!this.formobj) { alert('BUG: Formul�rio n�o definido corretamente!'); return; }; __buttonSubmit__ = gElm(bt); __newWidth__ = newWidth; __buttonSubmitSrc__ = buttonSubmitSrc;};function ValidationDesc(inputitem, desc, error) { this.desc = desc; this.error = error; this.itemobj = inputitem; this.validate = vdesc_validate;};function vdesc_validate() { if (!validateInput(this.desc, this.itemobj, this.error)) { if (!__cAlert__)this.itemobj.focus(); return false; }; return true;};function ValidationSet(inputitem) { this.vSet = new Array(); this.add = add_validationdesc; this.validate = vset_validate; this.itemobj = inputitem;};function add_validationdesc(desc, error) { this.vSet[this.vSet.length] = new ValidationDesc(this.itemobj, desc, error);};function vset_validate() { for (var itr = 0; itr < this.vSet.length; itr++) { if (!this.vSet[itr].validate()) { return false; }; }; return true;};function validateEmail(email) { if (email.length <= 0) { return true; }; var splitted = email.match('^(.+)@(.+)$'); if (splitted == null)return false; if (splitted[1] != null ) { var regexp_user = /^\"?[\w-_\.]*\"?$/; if (splitted[1].match(regexp_user) == null)return false; }; if (splitted[2] != null) { var regexp_domain = /^[\w-\.]*\.[A-Za-z]{2,4}$/; if (splitted[2].match(regexp_domain) == null) { var regexp_ip = /^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/; if (splitted[2].match(regexp_ip) == null)return false; }; return true; }; return false;};function TestComparison(objValue, strCompareElement, strvalidator, strError) { var bRet = true; var objCompare = null; if (!objValue.form) { alert('BUG: Formul�rio n�o definido!'); return false; }; objCompare = objValue.form.elements[strCompareElement]; if (!objCompare) { alert('BUG: Campo com o nome ' + strCompareElement + ' n�o encontrado!'); return false; }; var cmpstr = ''; switch (strvalidator) { case 'equal': case 'eq': { if (objValue.value != objCompare.value) {  if (__lang__ == 'en') {  cmpstr = ' must be the same as field \"';  }  else if (__lang__ == 'es') {  cmpstr = ' debe ser igual al campo \"';  }  else {  cmpstr = ' deve ser igual ao campo \"';  }  bRet = false; }; break; }; case 'notequal': case 'noteq': { if (objValue.value.length > 0 && objCompare.value.length > 0 && objValue.value == objCompare.value) {  if (__lang__ == 'en') {  cmpstr = ' must be different from field \"';  }  else if (__lang__ == 'es') {  cmpstr = ' debe ser diferente del campo \"';  }  else {  cmpstr = ' deve ser diferente do campo \"';  }  bRet = false; }; break; }; }; if (bRet == false) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Field \"' + objValue.title + '\"' + cmpstr + objCompare.title + '\".'; } else if (__lang__ == 'es') { strError = 'El campo \"' + objValue.title + '\"' + cmpstr + objCompare.title + '\".'; } else { strError = 'O campo \"' + objValue.title + '\"' + cmpstr + objCompare.title + '\".'; } cBgColor(objValue); }; boxAlert(strError, objValue); }; if (bRet)rBgColor(objValue); return bRet;};function TestSelMin(objValue, strMinSel, strError) { var bret = true; var objcheck = objValue.form.elements[objValue.name]; var chkcount = 0; if (objcheck.length) { for (var c = 0; c < objcheck.length; c++) { if (objcheck[c].checked == '1') { chkcount++; }; }; } else { chkcount = (objcheck.checked == '1') ? 1 : 0; }; var minsel = eval(strMinSel); if (chkcount < minsel) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Select at least ' + minsel + ' option(s) for field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = 'Seleccione al menos ' + minsel + ' opciones para el campo \"' + objValue.title + '\".'; } else { strError = 'Selecione ao menos ' + minsel + ' op��o(�es) para o campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); bret = false; }; if (bret)rBgColor(objValue); return bret;};function TestSelMax(objValue, strMaxSel, strError) { var gret = true; var objcheck = objValue.form.elements[objValue.name]; var chkcount = 0; if (objcheck.length) { for (var c = 0; c < objcheck.length; c++) { if (objcheck[c].checked == '1') { chkcount++; }; }; } else { chkcount = (objcheck.checked == '1') ? 1 : 0; }; var maxsel = eval(strMaxSel); if (chkcount > maxsel) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Select at the most ' + maxsel + ' option(s) for field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = 'Seleccione como m�ximo ' + maxsel + ' opciones para el campo \"' + objValue.title + '\".'; } else { strError = 'Selecione no m�ximo ' + maxsel + ' op��o(�es) para o campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); gret = false; }; if (gret)rBgColor(objValue); return gret;};function TestDontSelect(objValue, index, strError) { var ret = true; if (objValue.selectedIndex == null) { alert('BUG: Este comando s� pode ser usado para elementos de sele��o.'); ret = false; } else if (objValue.selectedIndex == eval(index)) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Select one of the options for field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = 'Seleccione una de las opciones para el campo \"' + objValue.title + '\".'; } else { strError = 'Selecione uma das op��es para o campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); ret = false; cBgColor(objValue); }; if (ret)rBgColor(objValue); return ret;};function TestRequiredInput(objValue, strError) { var ret = true; if (eval(objValue.value.length) == 0) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Field \"' + objValue.title + '\" must be filled out.'; } else if (__lang__ == 'es') { strError = 'El campo \"' + objValue.title + '\" es obligatorio.'; } else { strError = 'O campo \"' + objValue.title + '\" � obrigat�rio.'; } }; boxAlert(strError, objValue); ret = false; cBgColor(objValue); }; if (ret)rBgColor(objValue); return ret;};function TestMaxLen(objValue, strMaxLen, strError) { var ret = true; if (eval(objValue.value.length) > eval(strMaxLen)) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Field \"' + objValue.title + '\" can contain up to ' + strMaxLen + ' character(s).'; strErrorCont = 'Currently it has: ' + objValue.value.length + ' character(s).'; } else if (__lang__ == 'es') { strError = 'El campo \"' + objValue.title + '\" puede contener hasta ' + strMaxLen + ' caracter(es).'; strErrorCont = 'Actualmente tiene: ' + objValue.value.length + ' car�cter(es).'; } else { strError = 'O campo \"' + objValue.title + '\" pode conter no m�ximo ' + strMaxLen + ' caracter(es).'; strErrorCont = 'Atualmente ele tem: ' + objValue.value.length + ' caracter(es).'; } }; cBgColor(objValue); boxAlert(strError + '\n' + strErrorCont, objValue); ret = false; }; if (ret)rBgColor(objValue); return ret;};function TestMinLen(objValue, strMinLen, strError) { var ret = true; if (eval(objValue.value.length) < eval(strMinLen)) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Field \"' + objValue.title + '\" must contain at least ' + strMinLen + ' character(s).'; strErrorCont = 'Currently it has: ' + objValue.value.length + ' character(s).'; } else if (__lang__ == 'es') { strError = 'El campo \"' + objValue.title + '\" debe contener un m�nimo de ' + strMinLen + ' caracter(es).'; strErrorCont = 'Actualmente tiene: ' + objValue.value.length + ' car�cter(es).'; } else { strError = 'O campo \"' + objValue.title + '\" deve conter no m�nimo ' + strMinLen + ' caracter(es).'; strErrorCont = 'Atualmente ele tem: ' + objValue.value.length + ' caracter(es).'; } }; cBgColor(objValue); boxAlert(strError + '\n' + strErrorCont, objValue); ret = false; }; if (ret)rBgColor(objValue); return ret;};function TestInputType(objValue, strRegExp, strError, strDefaultError) { var ret = true; var charpos = objValue.value.search(strRegExp); if (objValue.value.length > 0 && charpos >= 0) { if (!strError || strError.length == 0) { strError = strDefaultError; if (__lang__ == 'en') { strErrorCont = 'Error of character in position: '; } else if (__lang__ == 'es') { strErrorCont = 'Error en el car�cter en la posici�n: '; } else { strErrorCont = 'Erro no caracter na posi��o: '; } }; cBgColor(objValue); boxAlert(strError + '\n' + strErrorCont + eval(charpos + 1) + '.', objValue); ret = false; }; if (ret)rBgColor(objValue); return ret;};function TestEmail(objValue, strError) { var ret = true; if (objValue.value.length > 0 && !validateEmail(objValue.value)) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = '\"' + objValue.value + '\" is not a valid e-mail for field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = '\"' + objValue.value + '\" no es un e-mail v�lido para el campo \"' + objValue.title + '\".'; } else { strError = '\"' + objValue.value + '\" n�o � um e-mail v�lido para o campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); ret = false; cBgColor(objValue); }; if (ret)rBgColor(objValue); return ret;};function TestRegExp(objValue, strRegExp, strError) { var ret = true; if (objValue.value.length > 0 && !objValue.value.match(strRegExp)) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Invalid character found in field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = 'Car�cter no permitido encontrado en el campo \"' + objValue.title + '\".'; } else { strError = 'Caracter n�o permitido encontrado no campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); ret = false; cBgColor(objValue); }; if (ret)rBgColor(objValue); return ret;};function TestSelectOneRadio(objValue, strError) { var objradio = objValue.form.elements[objValue.name]; if (!objradio)alert('BUG: N�o foi poss�vel encotrar nenhum radioButton no formul�rio.\nCertifique-se de que eles existem e que tem o atributo \"name\".'); var one_selected = false; for (var r = 0; r < objradio.length; r++) { if (objradio[r].checked == '1') { one_selected = true; break; }; }; if (false == one_selected) { if (!strError || strError.length == 0) { if (__lang__ == 'en') { strError = 'Select one of the options for field \"' + objValue.title + '\".'; } else if (__lang__ == 'es') { strError = 'Seleccione una de las opciones para el campo \"' + objValue.title + '\".'; } else { strError = 'Selecione uma das op��es para o campo \"' + objValue.title + '\".'; } }; boxAlert(strError, objValue); }; return one_selected;};function TestCpf(v) { if (v == "" || v == "" || v == "" || v == "" || v == "" || v == "" || v == "" || v == "" || v == "" || v == "")return false; if (!v)return true; var s = null; var r = null; if (v.length != 11 || v.match(/1{11};|2{11};|3{11};|4{11};|5{11};|6{11};|7{11};|8{11};|9{11};|0{11};/))return false; s = 0; for (var i = 0; i < 9; i++)s += parseInt(v.charAt(i)) * (10 - i); r = 11 - (s % 11); if (r == 10 || r == 11)r = 0; if (r != parseInt(v.charAt(9)))return false; s = 0; for (var i = 0; i < 10; i++)s += parseInt(v.charAt(i)) * (11 - i); r = 11 - (s % 11); if (r == 10 || r == 11)r = 0; if (r != parseInt(v.charAt(10)))return false; return true; ; }; function TestCnpj(v) { if (!v)return true; var m = new Array('543298765432', '6543298765432'); var d = new Array(0, 0); for (var t = 0; t < 2; t++) { for (x = 0; x < 13; x++) { if ((t == 0 && x != 12) || t == 1)d[t] += (parseInt(v.slice(x, x + 1)) * parseInt(m[t].slice(x, x + 1))); }; d[t] = (d[t] * 10) % 11; if (d[t] == 10)d[t] = 0; }; return (d[0] == parseInt(v.slice(12, 13)) && d[1] == parseInt(v.slice(13, 14)));};function TestFile(v, ext) { if (!v)return true; var e = ext.split("00000000000111111111112222222222233333333333444444444445555555555566666666666777777777778888888888899999999999,"); for (var i = 0; i < e.length; i++) { if (v.substr(v.lastIndexOf('.') + 1) == e[i])return true; }; return false;};function replaceAll(str, replacements) { for (i = 0; i < replacements.length; i++) { var idx = str.indexOf(replacements[i][0]); while (idx > - 1) { str = str.replace(replacements[i][0], replacements[i][1]); idx = str.indexOf(replacements[i][0]); }; }; return str;};function addMultiVal() { var arrPar = []; for (var i = 0; i < arguments.length; i++) { arrPar[i] = arguments[i]; }; var fld = arrPar[0]; arrPar = arrPar.slice(1, arrPar.length); for (var a = 0; a < arrPar.length; a++) { this.av(fld, arrPar[a]); }; delete arrPar, fld;};function validateInput(strValidateStr, objValue, strError) { var ret = true; var epos = strValidateStr.search('='); var command = ''; var cmdvalue = ''; if (epos >= 0) { command = strValidateStr.substring(0, epos); cmdvalue = strValidateStr.substr(epos + 1); } else { command = strValidateStr; }; switch (command) { case 'req': case 'required': { ret = TestRequiredInput(objValue, strError); break; }; case 'maxlength': case 'maxlen': { ret = TestMaxLen(objValue, cmdvalue, strError); break; }; case 'minlength': case 'minlen': { ret = TestMinLen(objValue, cmdvalue, strError); break; }; case 'alnum': case 'alphanumeric': { if (__lang__ == 'en') {  strTxtError = 'Only alphanumeric characters (letters and numbers) are valid for field'; } else if (__lang__ == 'es') {  strTxtError = 'S�lo caracteres alfanum�ricos (letras y n�meros) son permitidos para el campo'; } else {  strTxtError = 'Apenas caracteres alfanum�ricos(letras e n�meros) s�o permitidos para o campo'; } ret = TestInputType(objValue, '[^A-Za-z0-9����������������������������������������������\\s]', strError, strTxtError + ' \"' + objValue.title + '\".'); break; }; case 'num': case 'number': case 'numeric': { if (__lang__ == 'en') {  strTxtError = 'Only numeric characters (numbers) are valid for field'; } else if (__lang__ == 'es') {  strTxtError = 'S�lo caracteres num�ricos (n�meros) son permitidos para el campo'; } else {  strTxtError = 'Apenas caracteres num�ricos(n�meros) s�o permitidos para o campo'; } ret = TestInputType(objValue, '[^0-9]', strError, strTxtError + ' \"' + objValue.title + '\".'); break; }; case 'letters': case 'let': { if (__lang__ == 'en') {  strTxtError = 'Only letters are valid for field'; } else if (__lang__ == 'es') {  strTxtError = 'S�lo letras son permitidas para el campo'; } else {  strTxtError = 'Apenas letras s�o permitidas para o campo'; } ret = TestInputType(objValue, '[^A-Za-z����������������������������������������������\\s]', strError, strTxtError + ' \"' + objValue.title + '\".'); break; }; case 'restrict': case 'rest': { if (__lang__ == 'en') {  strTxtError = 'Only letters, numbers, \"-\" and \"_\" are valid for field'; } else if (__lang__ == 'es') {  strTxtError = 'S�lo letras, n�meros, \"-\" y \"_\" son permitidos para el campo'; } else {  strTxtError = 'Apenas letras, n�meros, \"-\" e \"_\" s�o permitidas para o campo'; } ret = TestInputType(objValue, '[^A-Za-z0-9-_]', strError, strTxtError + ' \"' + objValue.title + '\".'); break; }; case 'email': { ret = TestEmail(objValue, strError); break; }; case "": case "": { if (isNaN(objValue.value)) {  if (__lang__ == 'en') {  strTxtError = 'Only numeric characters (numbers) are valid for field';  }  else if (__lang__ == 'es') {  strTxtError = 'S�lo caracteres num�ricos (n�meros) son permitidos para el campo';  }  else {  strTxtError = 'Apenas caracteres num�ricos(n�meros) s�o permitidos para o campo';  }  boxAlert(strTxtError + ' \"' + objValue.title + '\".', objValue);  cBgColor(objValue);  return false; }; if (eval(objValue.value) > eval(cmdvalue)) {  if (!strError || strError.length == 0) {  if (__lang__ == 'en') {  strError = 'Field \"' + objValue.title + '\" must be smaller or equal than: ' + cmdvalue + '.';  }  else if (__lang__ == 'es') {  strError = 'El campo \"' + objValue.title + '\" debe ser menor o igual a: ' + cmdvalue + '.';  }  else {  strError = 'O campo \"' + objValue.title + '\" deve ser menor ou igual a: ' + cmdvalue + '.';  }  };  boxAlert(strError, objValue);  cBgColor(objValue);  return false; }; break; }; case "": case "": { if (isNaN(objValue.value)) {  if (__lang__ == 'en') {  strTxtError = 'Only numeric characters (numbers) are valid for field';  }  else if (__lang__ == 'es') {  strTxtError = 'S�lo caracteres num�ricos (n�meros) son permitidos para el campo';  }  else {  strTxtError = 'Apenas caracteres num�ricos(n�meros) s�o permitidos para o campo';  }  boxAlert(strTxtError + ' \"' + objValue.title + '\".', objValue);  cBgColor(objValue);  return false; }; if (eval(objValue.value) < eval(cmdvalue)) {  if (!strError || strError.length == 0) {  if (__lang__ == 'en') {  strError = 'Field \"' + objValue.title + '\" must be bigger or equal than: ' + cmdvalue + '.';  }  else if (__lang__ == 'es') {  strError = 'El campo \"' + objValue.title + '\" debe ser mayor o igual a: ' + cmdvalue + '.';  }  else {  strError = 'O campo \"' + objValue.title + '\" deve ser maior ou igual a: ' + cmdvalue + '.';  }  };  boxAlert(strError, objValue);  cBgColor(objValue);  return false; }; break; }; case 'regex': { ret = TestRegExp(objValue, cmdvalue, strError); break; }; case 'dontselect': { ret = TestDontSelect(objValue, cmdvalue, strError); break; }; case 'selmin': { ret = TestSelMin(objValue, cmdvalue, strError); break; }; case 'selmax': { ret = TestSelMax(objValue, cmdvalue, strError); break; }; case 'selone': { ret = TestSelectOneRadio(objValue, strError); break; }; case 'equal': case 'eq': case 'notequal': case 'noteq': { return TestComparison(objValue, cmdvalue, command, strError); break; }; case 'cpf': { var tmpValue = replaceAll(objValue.value, [['.', ''], ['/', ''], ['-', ''], [' ', '']]); ret = TestCpf(tmpValue); if (!ret) {  if (__lang__ == 'en') {  strErrorTxt = 'is not a valid CPF number for field';  }  else if (__lang__ == 'es') {  strErrorTxt = 'no es un n�mero de CPF v�lido para el campo';  }  else {  strErrorTxt = 'n�o � um n�mero de CPF v�lido para o campo';  }  boxAlert('\"' + objValue.value + '\" ' + strErrorTxt + ' \"' + objValue.title + '\".', objValue);  cBgColor(objValue); } else rBgColor(objValue); delete tmpValue; break; }; case 'cnpj': { var tmpValue = replaceAll(objValue.value, [['.', ''], ['/', ''], ['-', ''], [' ', '']]); ret = TestCnpj(tmpValue); if (!ret) {  if (__lang__ == 'en') {  strErrorTxt = 'is not a valid CNPJ number for field';  }  else if (__lang__ == 'es') {  strErrorTxt = 'no es un n�mero de CNPJ v�lido para el campo';  }  else {  strErrorTxt = 'n�o � um n�mero de CNPJ v�lido para o campo';  }  boxAlert('\"' + objValue.value + '\" ' + strErrorTxt + ' \"' + objValue.title + '\".', objValue);  cBgColor(objValue); } else rBgColor(objValue); delete tmpValue; break; }; case 'file': { ret = TestFile(objValue.value.toLowerCase(), cmdvalue); if (!ret) {  if (__lang__ == 'en') {  boxAlert('Field \"' + objValue.title + '\" allows only \".' + cmdvalue + ' \"archives.', objValue);  }  else if (__lang__ == 'es') {  boxAlert('El campo \"' + objValue.title + '\" permite s�lo archivos con la extensi�n \".' + cmdvalue + ' \".', objValue);  }  else {  boxAlert('O campo \"' + objValue.title + '\" permite somente arquivos com a extens�o \".' + cmdvalue + ' \".', objValue);  }  cBgColor(objValue); } else rBgColor(objValue); delete tmpValue; break; }; }; if (ret)rBgColor(objValue); return ret;};function cBgColor(o) { o.style.backgroundColor = valColorError;};function rBgColor(o) { o.style.backgroundColor = "";};function rABgColor() { for (var itr = 0; itr < this.elements.length; itr++) { rBgColor(this.elements[itr]); };};function only(t, o, e) { if (window.event)key = window.event.keyCode; else if (e)key = e.which; else return true; S = (o) ? o : ''; if (t == 'num' || t == 'number' || t == 'numeric')S += '0123456789'; if (t == 'alnum' || t == 'alphanumeric')S += 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ���������������������������������������������� 0123456789'; if (t == 'let' || t == 'letters')S += 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ���������������������������������������������� '; if (t == 'rest' || t == 'restrict')S += 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; if (t == 'email')S += 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@-_.'; if (key == null || key == 0 || key == 8 || key == 9 || key == 13 || key == 27)return true; else if (S.indexOf(String.fromCharCode(key)) !=- 1)return true; else return false;};function not(S, e) { if (window.event)key = window.event.keyCode; else if (e)key = e.which; else return true; if (!S)return false; else if (key == null || key == 0 || key == 8 || key == 9 || key == 13 || key == 27)return true; else if (S.indexOf(String.fromCharCode(key)) !=- 1)return false; else return true;};function jump(o, e) { if (window.event)key = window.event.keyCode; else if (e)key = e.which; else return true; if (key == 9 || key == 2 || key == 16)return false; if (o.value.length == o.maxLength) { for (var i = 0; i < o.form.length; i++) { if (o.form[i] == o && o.form[i + 1]) { if (o.form[i + 1])o.form[i + 1].focus(); break; }; } };};function checkReset(f) { if (__lang__ == 'en') { strErrorTxt = 'All data submitted will be deleted.\nTo delete all data click \"OK\".\nTo continue submitting information click \"Cancel\".'; } else if (__lang__ == 'es') { strErrorTxt = 'Todos los datos registrados ser�n borrados.\nPara borrar todos los datos haga clic en \"OK\".\nPara continuar registrando haga clic en \"Cancelar\".'; } else { strErrorTxt = 'Todos os dados preenchidos ser�o apagados.\nPara apagar todos os dados clique em \"OK\".\nPara continuar preenchendo clique em \"Cancelar\".'; } if (confirm(strErrorTxt))gElm(f).reset();};function clearMe(w, s) { (w.value == s) ? w.value = '' : 0;};function leaveMe(w, s) { (w.value.length == 0) ? w.value = s : 0;};function boxAlert(x, f) { if (__cAlert__) { if (__cAlertShow__) { var boxCode = ['<div class="w570">','<h2 class="titSecao titAtencao">','Aten��o','</h2>','<br class="cb" />','<div id="feedLogin" class="feedLoginLolly">','<p id="txtFeed"></p>','</div>','<p>','<a href="#" onclick="closeBox(\'defaultLollyId\');return false;">','<img src="../img/bt_fechar_validacao.gif" alt="Fechar" title="Fechar" /><br />','</a>','</p>','</div>'];boxCode = boxCode.join('');Box.open({content:boxCode,onOpen:function(){gElm(__cAlertTxt__).innerHTML = x;},onClose:function(){}}); } else { sDiv(__cAlertDiv__); f.focus();gElm(__cAlertTxt__).innerHTML = x; } __oldFocus__ = f; } else { alert(x); }};function oldFocus() { __oldFocus__.focus();};;var ___onCloseFnc___ = null;var __lastScrollPos__ = 0;var __pageHeight__ = 0;var __pageWidth__ = 0;var __outOfThePage__ = '-5000px';var ___bgBoxElm___ = 'openBoxPopBg';var __tempParam__ = {};var __configByOpenBox__ = false;var __lastBoxConfig__ = {};__lastBoxConfig__.bgColor = null;__lastBoxConfig__.alpha = null;__lastBoxConfig__.zIndex = null;__lastBoxConfig__.fx = null;__lastBoxConfig__.popDefaultStyle = null;__lastBoxConfig__.avoidEsc = null;var tmpImgLoader;var imagemPop;var loaderPersId;var ___bgColor___ = null;var ___bgAlpha___ = null;var ___zIndex___ = null;var ___avoidEsc___ = null;var ___effect___ = false;var __tempBoxId__ = '';function hSelects(){for(var i=0;i<gTag('select').length;i++) gTag('select')[i].style.visibility = 'hidden';return false;}function sSelects(){for(var m=0;m<gTag('select').length;m++) gTag('select')[m].style.visibility = 'visible';return false;}function winW(){return window.innerWidth ? window.innerWidth : document.documentElement.offsetWidth;}function winH(){return window.innerHeight ? window.innerHeight : document.documentElement.offsetHeight;}function winHPos(){return document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;}function pageWidth(){var htmlWidth = gTag('body')[0].scrollWidth;var bodyWidth = gTag('html')[0].scrollWidth;return (htmlWidth > bodyWidth) ? htmlWidth : bodyWidth;}function pageHeight(){if(!$('spanTempOpenBox'))createElm(null,['span',{id:"spanTempOpenBox"},'']);var elms = document.getElementsByTagName('body')[0].childNodes;var __elmsPos__ = new Array();var __maxHeight__ = 0;var htmlHeight = gTag('html')[0].scrollHeight;var bodyHeight = gTag('body')[0].scrollHeight;var compareHeight = (htmlHeight > bodyHeight) ? htmlHeight : bodyHeight;for(var i=0; i<elms.length; i++)if(elms[i].nodeType==1 && elms[i].id != ___bgBoxElm___)__elmsPos__.push([getPos(elms[i])[1],elms[i].offsetHeight]);for(var i=0; i<__elmsPos__.length; i++)if(__elmsPos__[i][0] >= __maxHeight__)__maxHeight__ = __elmsPos__[i][0] + __elmsPos__[i][1];return ((__maxHeight__ > compareHeight) ? __maxHeight__ : compareHeight);}function configBox(o){if(typeof(o) == 'string' && o == 'reset'){o = false;}else{o = o || __lastBoxConfig__;}___bgColor___ = o.bgColor || '000000';___bgAlpha___ = o.alpha || 50;___zIndex___ = o.zIndex || 10;___effect___ = (o.fx === false || o.fx === 'false') ? false : true;___avoidEsc___ = (o.avoidEsc === true || o.avoidEsc === 'true') ? true : false;__popDefaultStyle__ = o.popDefaultStyle || 'padding:10px;background-color:#fff;border:2px solid #E6E7E8;';if(!__configByOpenBox__){__lastBoxConfig__.bgColor = ___bgColor___;__lastBoxConfig__.alpha = ___bgAlpha___;__lastBoxConfig__.zIndex = ___zIndex___;__lastBoxConfig__.fx = ___effect___;__lastBoxConfig__.popDefaultStyle = __popDefaultStyle__;__lastBoxConfig__.avoidEsc = ___avoidEsc___;}}configBox();function openBox(e, o){if(is.ie5){alert('Este recurso n�o est� dispon�vel para o internet Explorer 5.0.');try{if(o.img && o.img.src)window.open(o.img.src);}catch(e){}return false;}o = o || false;var va = o.vAlign || 'middle';var ha = o.hAlign || 'center';var fix = (o.fix === true || o.fix === 'true') ? true : false;var doScroll = o.doScroll || ((o.doScroll === true || o.doScroll === 'true') ? true : false);var cls = (o.closeBox === true || o.closeBox === 'true') ? true : false;var onOpen = o.onOpen || false;var onClose = o.onClose || false;var config = o.config || false;if(doScroll){fix = true;va = (typeof(va) == 'number') ? va : doScroll;}if(config){__configByOpenBox__ = true;configBox(config);}var obj = {};obj.vAlign = va;obj.hAlign = ha;obj.fix = fix;obj.doScroll = doScroll;obj.closeBox = cls;obj.onOpen = onOpen;obj.onClose = onClose;obj.avoidEsc = ___avoidEsc___;if(!___avoidEsc___)addEvent(document,'keyup',openBoxKeyEvt);if(!window['fxAlpha'] || is.ie55)___effect___ = false;__pageHeight__ = pageHeight();__pageWidth__ = pageWidth();if(!e){if(!$('boxPopDefault'))createElm(false,['div',{id:'boxPopDefault', style:__popDefaultStyle__},'']);e = 'boxPopDefault';}__tempBoxId__ = e;var extra;if(is.ie){extra = 'background:#'+___bgColor___+';filter:Alpha(Opacity='+___bgAlpha___+')';}else{extra = 'background:#'+___bgColor___+';opacity:'+(___bgAlpha___/100);}if(!$(___bgBoxElm___)){createElm(false,['div',{id:___bgBoxElm___, style:'position:absolute;z-index:'+___zIndex___+';left:0,top:0;'+extra},'']);}delete extra;if(cls)addEvent($(___bgBoxElm___),'click',function(){closeBox(e);});hideBox(e);hideBox(___bgBoxElm___);if(o.img){var closeImg = (o.img.closeImg === false || o.img.closeImg === 'false') ? false : true;if(!$('imgTarget')){var img = document.createElement('img');img.setAttribute('id','imgTarget');$(e).appendChild(img);}if(!o.img.loader){if(!$('boxImgLoader')){createElm(false,['div',{id:'boxImgLoader', style:'position:absolute; top:'+__outOfThePage__+'; left:'+__outOfThePage__+';width:280px;height:auto;background:#F1F1F1;'},['p',{style:'margin:50px; 100px;text-align:center;'},'carregando imagem...']]);loaderPersId = 'boxImgLoader';}}else{if($(o.img.loader)){loaderPersId = $(o.img.loader).id;$(loaderPersId).style.position = 'absolute';$(loaderPersId).style.left = $(loaderPersId).style.top = __outOfThePage__;}else{alert('openBox Error (o.img): Loader ID "'+o.img.loader+'" not found');}}hideBox(loaderPersId);imagemPop = new Image();imagemPop.src = o.img.src;clearInterval(tmpImgLoader);tmpImgLoader = setInterval(function(){if(imagemPop.error){clearInterval(tmpImgLoader);alert('Erro ao carregar a imagem:\n'+imagemPop.src);}if(imagemPop.complete){clearInterval(tmpImgLoader);setTimeout(function(){if($(loaderPersId)){if(___effect___){fxAlpha(loaderPersId,1,0,function(){__afterLoadImageActions(e,o,obj,imagemPop,closeImg);},1);}else{hideBox(loaderPersId);__afterLoadImageActions(e,o,obj,imagemPop,closeImg);}}},500);}else{$(e).style.visibility = 'hidden';}}, 50);}$(e).style.top = __outOfThePage__;$(e).style.left = __outOfThePage__;alignBox(e, obj);prepareAlphaBox(___bgBoxElm___);prepareAlphaBox(e);if(o.img)$(loaderPersId).style.visibility = 'visible';if(is.ie)hSelects();var popCombos = gTag('select', $(e));for(var i=0; i<popCombos.length; i++)popCombos[i].style.visibility = "visible";if(___effect___){if(o.img){hDiv(e);fxFolded[___bgBoxElm___] = true;fxAlpha(___bgBoxElm___,0,(___bgAlpha___/100),function(){sDiv(e);fxFolded[loaderPersId] = true;fxAlpha(loaderPersId,0,1,function(){__applyFunctions(obj);},1);},1);}else{hDiv(e);fxFolded[___bgBoxElm___] = true;fxAlpha(___bgBoxElm___,0,(___bgAlpha___/100),function(){sDiv(e);fxFolded[e] = true;fxAlpha(e,0,1,function(){__applyFunctions(obj);},1);},1);}}else{showBox(___bgBoxElm___,___bgAlpha___);__applyFunctions(obj);if(o.img){showBox(loaderPersId);}else{showBox(e);}}}function alignBox(e, o){var va = o.vAlign;var ha = o.hAlign;var doScroll = o.doScroll;var fix = o.fix;var bgBox = $(___bgBoxElm___);$(e).style.position = 'absolute';$(e).style.zIndex = ___zIndex___+2;bgBox.style.height = __pageHeight__ +'px';bgBox.style.width = '100%';bgBox.style.top = 0;bgBox.style.left = 0;__tempParam__['elm'] = e;__tempParam__['obj'] = o;__doTheAlign(e,va,ha,fix);if(doScroll){var boxTop = Number($(e).style.top.split('px')[0]);if(winHPos() > boxTop || (winH() + winHPos()) < boxTop){__lastScrollPos__ = winHPos();if(!isNaN(doScroll)){window.scrollTo(0,doScroll);}else if(doScroll === true){if(!isNaN(va)){window.scrollTo(0,va);}else{alert('AlignBox Error (doScroll): The "vAlign" parameter MUST be a number.');}}}}}function closeBox(e){delEvent(document, 'keyup', openBoxKeyEvt);delEvent(window, 'scroll', __openBoxOnResizeFnc);delEvent(window, 'resize', __openBoxOnResizeFnc);delEvent(window, 'resize', __adjustBoxBgSize);if(___effect___){fxAlpha(e,1,0,function(){hDiv(e);fxAlpha(___bgBoxElm___,(___bgAlpha___/100),0,function(){__doCloseBox(e)},2);},1);}else{__doCloseBox(e)}if(__configByOpenBox__){configBox();__configByOpenBox__ = false;}}function __doCloseBox(e){if(___onCloseFnc___)try{___onCloseFnc___();}catch(e){alert('openBox Error (o.onClose):\n"'+e+'".');}clearInterval(tmpImgLoader);if($('imgTarget'))delElm('imgTarget');if($('boxImgLoader'))delElm('boxImgLoader');if($(loaderPersId))hDiv(loaderPersId);if($(___bgBoxElm___))delElm(___bgBoxElm___);if($('boxPopDefault'))delElm('boxPopDefault');if($(e))hDiv(e);if(is.ie)sSelects();if(__lastScrollPos__ != 0)window.scrollTo(0,__lastScrollPos__);imagemPop =___onCloseFnc___ =__tempBoxId__ = null;__tempParam__ = {};__lastScrollPos__ = 0;}function __applyFunctions(o){if(o.onOpen)try{o.onOpen();}catch(e){alert('openBox Error (o.onOpen):\n"'+e+'".');}if(o.onClose)___onCloseFnc___ = o.onClose;if(!o.fix){addEvent(window, 'scroll', __openBoxOnResizeFnc);addEvent(window, 'resize', __openBoxOnResizeFnc);}else{addEvent(window, 'resize', __adjustBoxBgSize);}}function __doTheAlign(e,va,ha,fix){var w = $(e).offsetWidth;var h = $(e).offsetHeight;if($('boxImgLoader') || $(loaderPersId)){var boxLoader2 = $('boxImgLoader') || $(loaderPersId);if(boxLoader2 == $('boxImgLoader'))sDiv('boxImgLoader');var ww = boxLoader2.offsetWidth;var hh = boxLoader2.offsetHeight;boxLoader2.style.position = 'absolute';boxLoader2.style.top = (winHPos()+(winH()/2)-(hh/2))+'px';boxLoader2.style.marginLeft = (winW()/2)+'px';boxLoader2.style.left = (-(ww/2))+'px';boxLoader2.style.zIndex = ___zIndex___+1;}if(isNaN(va)){switch(va){case 'top':$(e).style.top = winHPos()+'px';break;case 'middle':$(e).style.top = (winHPos()+(winH()/2)-(h/2))+'px';break;case 'bottom':if(is.ie){$(e).style.top = ((winHPos()+winH()-h)-4)+'px';}else{$(e).style.top = (winHPos()+winH()-h)+'px';}break;default:alert('alignBox Error (custom vertical align): Parameter "'+ va +'" is undefined');}}else{if(fix){$(e).style.top = va+'px';}else{$(e).style.top = winHPos()+va+'px';}}if(isNaN(ha)){if(ha.split('.n').length>1){$(e).style.left = '50%';$(e).style.marginLeft = (-($(e).offsetWidth/2)-ha.split('.n')[0])+'px';ha = 'false';}if(ha.split('.p').length>1){$(e).style.left = '50%';$(e).style.marginLeft = (ha.split('.p')[0]-($(e).offsetWidth/2))+'px';ha = 'false';}switch(ha){case 'left':$(e).style.marginLeft = 0;$(e).style.left = 0;break;case 'center':$(e).style.marginLeft = (-($(e).offsetWidth/2))+'px';$(e).style.left = '50%';$(e).style.right = 'auto';break;case 'right':$(e).style.marginLeft = 0;$(e).style.left = 'auto';$(e).style.right = 0;break;case 'false':break;default:alert('alignBox Error (custom horizontal align): Parameter "'+ ha +'" is undefined');}}else{$(e).style.marginLeft = 0;$(e).style.left = ha+'px';}__adjustBoxBgSize();}function __afterLoadImageActions(e,o,obj,imagemPop,closeImg){var tmpImg = $('imgTarget');if($('boxImgLoader'))delElm('boxImgLoader');tmpImg.width = imagemPop.width;tmpImg.height = imagemPop.height;tmpImg.src = imagemPop.src;tmpImg.title = 'Clique na imagem para fech�-la.';$(e).style.top = __outOfThePage__;$(e).style.left = __outOfThePage__;prepareAlphaBox(e);alignBox(e, obj);if(___effect___){fxFolded[e] = true;fxAlpha(e,0,1,null,1);}else{showBox(e);}if(closeImg){$('imgTarget').style.cursor = 'pointer';addEvent($('imgTarget'),'click',function(){closeBox(e);});}else{$('imgTarget').setAttribute('onclick',false);}delete tmpImg;}function __openBoxOnResizeFnc(){__doTheAlign(__tempParam__['elm'], __tempParam__['obj'].vAlign, __tempParam__['obj'].hAlign);}function __adjustBoxBgSize(){var bgBox = $(___bgBoxElm___);if(!bgBox)return false;if(bgBox.offsetWidth <= __pageWidth__){ if(is.ie6 && pageWidth() == winW()){bgBox.style.width = (pageWidth()-20)+'px';}else{bgBox.style.width = pageWidth()+'px';}}else{bgBox.style.width = '100%';}if(__pageHeight__ < winH()){ bgBox.style.height = winH() +'px';if(is.ie){bgBox.style.top = (winHPos()-4) +'px';}else{bgBox.style.top = winHPos() +'px';}}else if(__pageHeight__ <= bgBox.offsetHeight){bgBox.style.height = pageHeight()+'px';}else{bgBox.style.height = __pageHeight__ +'px';}}function hideBox(e){if(___effect___){$(e).style.opacity = '0';$(e).style.filter = 'Alpha(Opacity=0)';}$(e).style.visibility = 'hidden';sDiv(e);}function prepareAlphaBox(e){if(___effect___){$(e).style.opacity = '0';$(e).style.filter = 'Alpha(Opacity=0)';$(e).style.visibility = 'visible';sDiv(e);}else{$(e).style.visibility = 'hidden';}}function showBox(e, alpha){if(___effect___ || alpha){alpha = alpha || 100;$(e).style.opacity = (alpha/100);$(e).style.filter = 'Alpha(Opacity='+alpha+')';}$(e).style.visibility = 'visible';sDiv(e);}function openBoxKeyEvt(evt){evt = evt || window.event;if(evt.keyCode == 27) closeBox(__tempBoxId__);}function delEvent(elm,type,fnc,rt){if(elm.detachEvent){elm.detachEvent('on'+type, fnc);}else if(elm.removeEventListener){elm.removeEventListener(type, fnc, (rt || false));}else{elm['on'+type] = false;}};function ajax(o){if(!o.url){alert('URL not defined');return false;};try{ this.xmlhttp = new XMLHttpRequest();}catch(ee){ try{ this.xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); }catch(eee){ try{ this.xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); }catch(E){this.xmlhttp = false; }; };};this.json = (o.json != undefined) ? o.json : true;this.url = (o.url) ? o.url : null;this.serialize = (o.serialize) ? o.serialize : null;this.method = (o.method) ? o.method.toUpperCase() : 'POST';this.debug = (o.debug) ? o.debug : false;this.results = null;this.extra = (o.extra) ? o.extra: null;this.timeout = ((o.timeout) ? o.timeout : 60) * 1000;this.encrypt = (o.encrypt == '') ? o.encrypt : true;this.parameters = (o.parameters) ? o.parameters : {};this._parameters = '';this._timer;_this = this;this._64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';this._e = function(_77){var i = 0;var _70 = new String('');var _71, _72, _73;var _74, _75, _76, _79;while (i < _77.length) {_71 = _77.charCodeAt(i++);_72 = _77.charCodeAt(i++);_73 = _77.charCodeAt(i++);_74 = _71 >> 2;_75 = ((_71 & 3) << 4) | (_72 >> 4);_76 = ((_72 & 15) << 2) | (_73 >> 6);_79 = _73 & 63;if(isNaN(_72)) _76 = _79 = 64;else if(isNaN(_73)) _79 = 64;_70 += this._64.charAt(_74)+this._64.charAt(_75);_70 += this._64.charAt(_76)+this._64.charAt(_79);};return _70;};this._serialize = function(f){var f = (typeof (f) == 'object') ? f : gElm(f);var ae = f.getElementsByTagName('input');var at = f.getElementsByTagName('textarea');var as = f.getElementsByTagName('select');var e = Array();var q = 0;while(q<ae.length){ if(ae[q].type != 'button' && ae[q].type != 'reset' && ae[q].type != 'image' && ae[q].type != 'submit' && ae[q].type != 'file'){if(ae[q].type == 'radio'){ if(ae[q].checked) e.push(ae[q]);} else if(ae[q].type == 'checkbox'){if(ae[q].checked == true) e.push(ae[q]);} else {e[e.length] = (ae[q]);};};q++;};var m=0;while(m<as.length){if(as[m].selectedIndex != -1){e[e.length] = (as[m]);};m++;};var j=0;while(j<at.length){e[e.length] = (at[j]);j++;};var k=0;while(k<e.length){this.parameters[e[k].name] = e[k].value;k++;};};if(this.serialize) this._serialize(this.serialize);for(a in this.parameters){this._parameters += a + '=' + ((this.encrypt && !this.debug) ? this._e(escape(this.parameters[a].toString())) : escape(this.parameters[a].toString())) + '&';};this._parameters += '&cacheBuster='+new Date().getTime();if (this.debug) alert('DEBUG\nurl: ' + this.url + '\nparameters: ' + this._parameters + '\nmethod: ' + this.method);this._snd = function(xmlhttp, extra, timeout, timer){try{this.onInit = (o.onInit) ? o.onInit(extra) : null;timer = setTimeout(function(){xmlhttp.abort();if(o.onTimeout){o.onTimeout(extra);} else{alert('N�o foi poss�vel enviar sua requisi��o.\nTempo de conex�o excedida.');}return false;}, timeout); xmlhttp.onreadystatechange = function(){if(xmlhttp.readyState == 4 ){if(!xmlhttp.responseText){return false;}clearTimeout(timer);this.results = (_this.json) ? eval(xmlhttp.responseText) : xmlhttp.responseText;(o.onFinish) ? o.onFinish(this.results, extra): null;};};if(this.method == 'POST') {xmlhttp.open(this.method, this.url, true);xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(this._parameters);} else {xmlhttp.open(this.method, this.url + '?' + this._parameters, true); xmlhttp.send(null);};} catch (err){(o.onError) ? o.onError(this.results, this.extra) : function(){alert('Erro durante o envio.\n'+err+'\nPor favor tente novamente.');return false;};return false;};};this._snd(this.xmlhttp, this.extra, this.timeout, this._timer);};ajaxRun = function(o){new ajax(o);};var include = function($url, $obj){$obj = typeof($obj) == 'object' ? $obj : {};var onInit = typeof($obj.onInit) == 'function' ? $obj.onInit : null;var onError = typeof($obj.onError) == 'function' ? $obj.onError : null;var onFinish = typeof($obj.onFinish) == 'function' ? $obj.onFinish : null;if(onInit)onInit();var req = false;if (window.XMLHttpRequest) {try {req = new XMLHttpRequest;} catch (e) {req = false;}} else if (window.ActiveXObject) {try {req = new ActiveXObject("Msxml2.XMLHTTP");} catch (ee) {try {req = new ActiveXObject("Microsoft.XMLHTTP");} catch (eee) {req = false;}}}if (req) {req.open("GET", $url, false);req.send(null);if(onFinish)onFinish(req.responseText);return req.responseText;} else {if(onError){onError();}else{alert("Unable to load include file: " + u);}}};;